'use strict';
const room = 'default_room';
module.exports = app => {
  class Controller extends app.Controller {
    async index() {
      const message = this.ctx.args[0];
      this.ctx.app.io.of('/').to(room).emit('customEmit', { msg: 'welcome', id: this.ctx.socket.id });
      console.log('chat :', message + ' : ' + process.pid);
      this.ctx.socket.emit('customEmit', "123321");
    }
    async room(){
      
    }
  }
  return Controller;
};
